/**
 *  Copyright 2011 Marco Berri - marcoberri@gmail.com
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and limitations under the License.
 **/

/**
 * 
 * 
 *The main 'geoname' table has the following fields :
---------------------------------------------------
geonameid         : integer id of record in geonames database
name              : name of geographical point (utf8) varchar(200)
asciiname         : name of geographical point in plain ascii characters, varchar(200)
alternatenames    : alternatenames, comma separated varchar(5000)
latitude          : latitude in decimal degrees (wgs84)
longitude         : longitude in decimal degrees (wgs84)
feature class     : see http://www.geonames.org/export/codes.html, char(1)
feature code      : see http://www.geonames.org/export/codes.html, varchar(10)
country code      : ISO-3166 2-letter country code, 2 characters
cc2               : alternate country codes, comma separated, ISO-3166 2-letter country code, 60 characters
admin1 code       : fipscode (subject to change to iso code), see exceptions below, see file admin1Codes.txt for display names of this code; varchar(20)
admin2 code       : code for the second administrative division, a county in the US, see file admin2Codes.txt; varchar(80) 
admin3 code       : code for third level administrative division, varchar(20)
admin4 code       : code for fourth level administrative division, varchar(20)
population        : bigint (8 byte int) 
elevation         : in meters, integer
dem               : digital elevation model, srtm3 or gtopo30, average elevation of 3''x3'' (ca 90mx90m) or 30''x30'' (ca 900mx900m) area in meters, integer
timezone          : the timezone id (see file timeZone.txt)
modification date : date of last modification in yyyy-MM-dd format 
 */
package com.mbfasttrack.model;

import java.util.Date;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.GeoSpatialIndexed;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * @author Marco Berri marcoberri@gmail.com http://tecnicume.blogspot.com
 */
@Document
public class Geonames implements Base {

    @Id
    @Indexed
    private String id;
    private Integer geonameid;
    private String name;
    private String asciiname;
    private String alternatenames;
    private Double latitude;
    private Double longitude;
    private String featureclass;
    private String featurecode;
    private String countrycode;
    private String cc2;
    private String admin1;
    private String admin2;
    private String admin3;
    private String admin4;
    private Integer population;
    private Integer elevation;
    private Integer dem;
    private Integer timezone;
    private Date modification;
    @GeoSpatialIndexed
    private Double[] latlon;

    /**
     * 
     */
    public Geonames() {
    }

    /**
     * 
     * @return
     */
    public String toString() {

        return "["
                + "id: " + this.id
                + " geonameid: " + this.geonameid
                + " name: " + this.name
                + " asciiname: " + this.asciiname
                + " alternatenames: " + this.alternatenames
                + " latitude: " + this.latitude
                + " longitude: " + this.longitude
                + "]";
    }

    /**
     * @return the id
     */
    public String getId() {
        return id;
    }

    /**
     * @param id the id to set
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * @return the geonameid
     */
    public Integer getGeonameid() {
        return geonameid;
    }

    /**
     * @param geonameid the geonameid to set
     */
    public void setGeonameid(Integer geonameid) {
        this.geonameid = geonameid;
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the asciiname
     */
    public String getAsciiname() {
        return asciiname;
    }

    /**
     * @param asciiname the asciiname to set
     */
    public void setAsciiname(String asciiname) {
        this.asciiname = asciiname;
    }

    /**
     * @return the alternatenames
     */
    public String getAlternatenames() {
        return alternatenames;
    }

    /**
     * @param alternatenames the alternatenames to set
     */
    public void setAlternatenames(String alternatenames) {
        this.alternatenames = alternatenames;
    }

    /**
     * @return the latitude
     */
    public Double getLatitude() {
        return latitude;
    }

    /**
     * @param latitude the latitude to set
     */
    public void setLatitude(Double latitude) {
        this.latitude = latitude;
    }

    /**
     * @return the longitude
     */
    public Double getLongitude() {
        return longitude;
    }

    /**
     * @param longitude the longitude to set
     */
    public void setLongitude(Double longitude) {
        this.longitude = longitude;
    }

    /**
     * @return the featureclass
     */
    public String getFeatureclass() {
        return featureclass;
    }

    /**
     * @param featureclass the featureclass to set
     */
    public void setFeatureclass(String featureclass) {
        this.featureclass = featureclass;
    }

    /**
     * @return the featurecode
     */
    public String getFeaturecode() {
        return featurecode;
    }

    /**
     * @param featurecode the featurecode to set
     */
    public void setFeaturecode(String featurecode) {
        this.featurecode = featurecode;
    }

    /**
     * @return the countrycode
     */
    public String getCountrycode() {
        return countrycode;
    }

    /**
     * @param countrycode the countrycode to set
     */
    public void setCountrycode(String countrycode) {
        this.countrycode = countrycode;
    }

    /**
     * @return the cc2
     */
    public String getCc2() {
        return cc2;
    }

    /**
     * @param cc2 the cc2 to set
     */
    public void setCc2(String cc2) {
        this.cc2 = cc2;
    }

    /**
     * @return the admin1
     */
    public String getAdmin1() {
        return admin1;
    }

    /**
     * @param admin1 the admin1 to set
     */
    public void setAdmin1(String admin1) {
        this.admin1 = admin1;
    }

    /**
     * @return the admin2
     */
    public String getAdmin2() {
        return admin2;
    }

    /**
     * @param admin2 the admin2 to set
     */
    public void setAdmin2(String admin2) {
        this.admin2 = admin2;
    }

    /**
     * @return the admin3
     */
    public String getAdmin3() {
        return admin3;
    }

    /**
     * @param admin3 the admin3 to set
     */
    public void setAdmin3(String admin3) {
        this.admin3 = admin3;
    }

    /**
     * @return the admin4
     */
    public String getAdmin4() {
        return admin4;
    }

    /**
     * @param admin4 the admin4 to set
     */
    public void setAdmin4(String admin4) {
        this.admin4 = admin4;
    }

    /**
     * @return the population
     */
    public Integer getPopulation() {
        return population;
    }

    /**
     * @param population the population to set
     */
    public void setPopulation(Integer population) {
        this.population = population;
    }

    /**
     * @return the elevation
     */
    public Integer getElevation() {
        return elevation;
    }

    /**
     * @param elevation the elevation to set
     */
    public void setElevation(Integer elevation) {
        this.elevation = elevation;
    }

    /**
     * @return the dem
     */
    public Integer getDem() {
        return dem;
    }

    /**
     * @param dem the dem to set
     */
    public void setDem(Integer dem) {
        this.dem = dem;
    }

    /**
     * @return the timezone
     */
    public Integer getTimezone() {
        return timezone;
    }

    /**
     * @param timezone the timezone to set
     */
    public void setTimezone(Integer timezone) {
        this.timezone = timezone;
    }

    /**
     * @return the modification
     */
    public Date getModification() {
        return modification;
    }

    /**
     * @param modification the modification to set
     */
    public void setModification(Date modification) {
        this.modification = modification;
    }

    /**
     * @return the latlon
     */
    public Double[] getLatlon() {
        return latlon;
    }

    /**
     * @param latlon the latlon to set
     */
    public void setLatlon(Double[] latlon) {
        this.latlon = latlon;
    }


  
}
